﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GenericStateMachine
{
    /// <summary>
    /// Represents a context of state machine.
    /// </summary>
    /// <typeparam name="TStateContext">The type of state context interface.</typeparam>
    /// <typeparam name="TState">The type of state interface.</typeparam>
    /// <typeparam name="TStateType">The type of concrete state enumeration.</typeparam>
    public interface IStateContext<TStateContext, TState, TStateType>
        where TStateContext : IStateContext<TStateContext, TState, TStateType>
        where TState : IState<TStateContext, TState, TStateType>
        where TStateType : struct, IComparable, IFormattable, IConvertible
    {
        /// <summary>
        /// Gets the value indicating current state type.
        /// </summary>
        TStateType CurrentState { get; }

        /// <summary>
        /// Gets the value indicating whether the <see cref="IStateContext{TStateContext, TState, TStateType}"/> is handling event. 
        /// </summary>
        bool IsHandling { get; }
    }
}
